import sys
score = sys.stdin.readlines()
score_lst = {"ZhangSan":[],"LiSi":[],"WangWu":[],"ZhaoLiu":[]}
for i in score:
    i = i.split()
    if i[0] == 'End':
        break
    score_lst["ZhangSan"].append(i[1])
    score_lst["LiSi"].append(i[2])
    score_lst["WangWu"].append(i[3])
    score_lst["ZhaoLiu"].append(i[4])
header = ["Name"]
for i in score:
    i = i.split()
    if i[0] == 'End':
        break
    header.append(i[0])
for i in header:
    print(f"{i:<15s}",end = '')
print()
for name,data in score_lst.items():
    print(f"{name:<15s}",end = '')
    for i in data:
        print(f"{i:<15s}",end = '')
    print()